//代码块 importM
import 'package:flutter/material.dart';

void main() {
  runApp(MaterialApp(
    home: Scaffold(
      appBar: AppBar(title: const Text("你好Flutter")),
      body: const MyApp(),
    ),
  ));
}

// 代码块  statelessW
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Center(

      // child: Container(
      //   margin: EdgeInsets.all(20.0), //容器外补白
      //   color: Colors.orange,
      //   child: Text("Hello world !"),
      // ),
      // child: Container(
      //   padding: EdgeInsets.all(20.0), //容器内补白
      //   color: Colors.orange,
      //   child: Text("Hello world !"),
      // ),
      child: Container(
        alignment: Alignment.center,
        height: 40,
        width: 200,
        decoration:  BoxDecoration(
            color: Colors.blue,
            borderRadius: BorderRadius.circular(15)
        ),
        child: const Text(
          "按钮",
          style: TextStyle(fontSize: 20),
        ),
      ),
    );
  }
}
